#include<stdio.h>
#include<string.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>
#include<unistd.h>
#include<stdlib.h>
#define NAME "save.c"
int main()
{
	int siz;
	int fd;
	char buf[100]="";
	if((fd=open(NAME,O_RDWR,S_IRUSR|S_IWUSR))==-1)
	{
		perror("fail to open the file\n");
		return -1;
	}
//	siz=lseek(fd,0,SEEK_END);
	lseek(fd,0,SEEK_SET);
	while(read(fd,buf,100) > 0){
		printf("%s",buf);
	}
	printf("\n");
	close(fd);
}
